After scanning a document, a scanning device or other device having scanning capability, such as a photocopier, generates image data. To reduce the amount of space required to store the image data, these devices may use a compression algorithm, which reduces the amount of data needed to represent the original image data. Typical compression algorithms include the JPEG format and the MMR format. These compression algorithms are variable codeword length coding algorithms. As a result, when compressing the original image data, the size of the compressed image data varies at every position within the original image. More specifically, more complex regions having significant changes cannot be compressed as much as simpler regions with few or smaller changes.
Due to having different sizes of compressed image data in different regions, it is difficult to calculate an address of a particular pixel in the compressed image data. As a result, it is difficult to perform certain image processing algorithms, such as rotation. To overcome this difficulty, it is necessary to have a memory with a size sufficient to hold the entire uncompressed image data when performing the image data rotation. While performing the rotation without the larger memory for storing the entire uncompressed image data is possible, the resulting rotated image is typically degraded.
Accordingly, it would be desirable to have the ability to rotate the image data without the need for a large memory and without degrading the resulting image.